using Microsoft.AspNetCore.Mvc;
using WebApi.Models;

namespace WebApi.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class AuthorizedLoginController : ControllerBase
    {
        private readonly ILogger<AuthorizedLoginController> _logger;

        public AuthorizedLoginController(ILogger<AuthorizedLoginController> logger)
        {
            _logger = logger;
        }

        [HttpPost(Name = "AuthorizedLogins")]
        public AuthorizedLoginModel Login( string Name, string pwd)
        {
            AuthorizedLoginModel model = new AuthorizedLoginModel();
            model.Name = Name;
            model.pwd = "dd";
            _logger.LogInformation("User :{Name} Login,pwd:.{pwd}", Name, pwd);
            return model;
        }
    }
}
